Taking the inverse of the period we can work out the maximum theoretical conversion rate per second.
/* Name : main.c
* Purpose : Source code for ADC Interfacing with Arduino.
* Author : Gemicates
* Date : 22-01-2018
* Website : www.gemicates.org
* Revision : None
*/
#include <LiquidCrystal.h>
// initialize the library with the numbers of the interface pins
LiquidCrystal lcd(4, 5, 6, 7, 8, 9, 10, 11, 12, 13); // REGISTER SELECT PIN, ENABLE, D0, D1, D2, D3, D4, D5, D6, D7 PINS
char ADCSHOW[5]; // initializing a character of size 5 for showing the ADC result
void setup()
{
lcd.begin(16, 2); // initializes the 16*2 LCD
}
void loop()
{
lcd.setCursor(0, 0); // set the cursor to row 0, column 0
lcd.print("GEMICATES LABS"); // print name
lcd.setCursor(0, 1); // set the cursor to row 0, column 1
lcd.print("ADC RESULT:"); // print name
String ADCVALUE = String (analogRead(A1)); // intailizing a string and storing ADC value in it
ADCVALUE.toCharArray(ADCSHOW, 5); // convert the reading to a char array
lcd.print(ADCSHOW); // showing character of ADCSHOW
lcd.print(" ");
}